﻿MethodState = function () {
    this.IP = 0;
    this.Stack = new EvaluationStack();
    this.Locals = new LocalMemory();
    this.Arguments = [];
    this.MethodBody = [];
};

MethodState.prototype.Branch = function (offset) {
    var testIp = this.IP + offset;

    if (testIp < 0 || testIp > this.MethodBody.length - 1)
        throw "InvalidBranchOperation";

    this.IP = this.IP + offset;
};